home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Palettes / MiscThreeStateButton / MiscTriStateButton.m < prev    next >
Text File  |  1995-04-12  |  2KB  |  51 lines

  1. //
  2. //    MiscTriStateButton.m -- palette class for the three state button
  3. //        Written by Don Yacktman Copyright (c) 1993 by Don Yacktman.
  4. //                Version 1.0.  All rights reserved.
  5. //
  6. //        This notice may not be removed from this source code.
  7. //
  8. //        This is a free object!  Contact the author for the latest version.
  9. //        Don Yacktman, 4279 N. Ivy Lane, Provo, UT, 84604
  10. //        e-mail:  Don_Yacktman@byu.edu
  11. //
  12. //    This object is included in the MiscKit by permission from the author
  13. //    and its use is governed by the MiscKit license, found in the file
  14. //    "LICENSE.rtf" in the MiscKit distribution.  Please refer to that file
  15. //    for a list of all applicable permissions and restrictions.
  16. //    
  17.  
  18. #import "MiscTriStateButton.h"
  19. #import "MiscThreeStateButton.subproj/MiscThreeStateButton.h"
  20. #import "MiscThreeStateButton.subproj/MiscThreeStateButtonCell.h"
  21.  
  22. @implementation MiscTriStateButton
  23.  
  24. - finishInstantiate
  25. {    // programmatically set up the example/prototype buttons
  26.     // to look the way we want them to look.
  27.     [button1 setTitle:"Neutral"];
  28.     [button1 setAltTitle:"Positive"];
  29.     [button1 setThirdTitle:"Negative"];
  30.     [button1 setType:MISC_CYCLIC_THREE_STATE];
  31.     [button1 setType:NX_TOGGLE];
  32.     [button1 setIcon:"NXswitch"];
  33.     [button1 setAltIcon:"Plus"];
  34.     [button1 setThirdIcon:"DontCare"];
  35.     [button1 setIconPosition:NX_ICONRIGHT];
  36.     [button1 setBordered:NO];
  37.     [button2 setTitle:"Off"];
  38.     [button2 setAltTitle:"On"];
  39.     [button2 setType:MISC_PLAIN_THREE_STATE];
  40.     [button2 setType:NX_TOGGLE];
  41.     [button2 setIcon:"NXswitch"];
  42.     [button2 setAltIcon:"NXswitchH"];
  43.     [button2 setThirdIcon:"DontCare"];
  44.     [button2 setIconPosition:NX_ICONRIGHT];
  45.     [button2 setBordered:NO];
  46.     [button2 setThirdTitle:"In Between"];
  47.     return self;
  48. }
  49.  
  50. @end
  51.